
using Godot;

public partial class LevelRoundTalkState : BaseLevelState
{
    LevelRoundTalk levelRoundTalk;
    public override void _Ready()
    {
        base._Ready();
        levelRoundTalk = GetNode<LevelRoundTalk>("LevelRoundTalk");
        levelRoundTalk.OnRoundTalkEnd += OnRoundTalkEndHandler;
    }

    private void OnRoundTalkEndHandler()
    {
        EmitSignal(SignalName.OnStateEnd, this);
    }

    public override void Enter()
    {
        base.Enter();
        GD.Print("回合对话开始", "the sound is : ", stateMachime.LevelManager.CurrentEvent.Sound);
        AudioManager.PlayBgm(stateMachime.LevelManager.CurrentEvent.Sound);
        levelRoundTalk.StartPlay(stateMachime.LevelManager.CurrentEvent.Words);
    }

    public override void Exit()
    {
        base.Exit();
    }
}
